package com.unicom.office.node;

import com.unicom.office.func.FuncCommon;
import com.unicom.office.type.DataTypeItem;
import com.unicom.office.type.ParagraphTypeItem;
import com.unicom.office.type.TextRangeTypeItem;
import com.unicom.office.type.TypeItem;
import com.unicom.office.func.FuncBase;
import com.unicom.office.unit.OfficeUnit;
import com.unicom.office.unit.ParagraphUnit;

public class ParagraphNode extends OfficeNode {
    public ParagraphNode(Object source) {
        super(source);
    }

    public OfficeUnit createUnit() {
        return new ParagraphUnit();
    }

    public boolean testChildType(FuncCommon child) {
        return child.getType() instanceof TextRangeTypeItem;
    }

    public TypeItem getType() {
        return ParagraphTypeItem.INSTANCE;
    }
}
